﻿Imports DBUtilitiesLibrary

Public Class CourseModificationPage
    Inherits System.Web.UI.Page

    
    Dim SQL As String
    Dim DBobj As New DARSDBConnection
    Dim DS As DataSet
    Dim ws As New DO_NOT_MOVE_ME_FROM_THIS_PROJECT.DARSWebservice



    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        'GridView2.Visible = False
        HyperLink1.Visible = False
      
    End Sub


    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        GridView2.Visible = True
        Label2.Text = ""
        HyperLink1.Visible = False

        DS = ws.getCourseInfo(TextBox1.Text)

        If DS.Tables(0).Rows.Count > 0 Then
            Label2.Text = ""
            Session("CourseID") = TextBox1.Text
        Else
            Label2.Text = "The course you have selected does not exist. Please select another course OR add a new course."
            HyperLink1.Visible = True
            TextBox1.Text = ""

        End If


    End Sub

    Protected Sub logout(ByVal sender As Object, ByVal e As EventArgs) Handles btnLogout.ServerClick
        Session.Abandon()
        Response.Redirect("NotLoggedIn.aspx")
    End Sub

    Protected Sub home(ByVal sender As Object, ByVal e As EventArgs) Handles btnhome.ServerClick
        Response.Redirect("AdvisorLandingPage.aspx")
    End Sub
End Class